package com.example.controller;

import com.example.exception.ServiceException;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
import io.micronaut.http.annotation.Header;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @author ：FuXx
 * @className : com.example.controller.TestController
 * @since ：2025/7/17
 */
@Slf4j
@Controller
public class TestController {

    @Get("/test")
    public Map<String, String> test(@Header String userAgent) {
        log.info(userAgent);
//        throw new ServiceException("test");
        return Map.of("k1", "v1", "k2", "v2");
    }
}
